package Annuaire;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.UnicastRemoteObject;

public class Server {

	public static void main(String[] args) {
		try {
			AnnuaireImpl obj = new AnnuaireImpl();
			AnnuaireInf stubCalc = (AnnuaireInf) UnicastRemoteObject
					.exportObject(obj, 0);
			Registry registry = LocateRegistry.createRegistry(1099);
			registry.rebind("Calculatrice", stubCalc);
			System.out.println("server ready...");
		} catch (Exception e) {
		}
	}
}
